﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Quintsys.Entities
{
    [Table("Addresses")]
    public class Address
    {
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Key]
        public int AddressId { get; set; }

        [MaxLength(150)]
        public string AddressLine1 { get; set; }

        [MaxLength(150)]
        public string AddressLine2 { get; set; }

        [MaxLength(150)]
        public string City { get; set; }

        [MaxLength(10)]
        public string PostalCodeUs { get; set; }

        [MaxLength(150)]
        public string PostalCodeOther { get; set; }

        [MaxLength(2)]
        public string StateUs { get; set; }

        [MaxLength(150)]
        public string StateProvinceOther { get; set; }

        [MaxLength(2)]
        public string Country { get; set; }

        public decimal Latitude { get; set; }

        public decimal Longitude { get; set; }

        public bool Deleted { get; set; }

        [DataType(DataType.DateTime)]
        public DateTime CreatedOnUtc { get; set; }
    }
}